// @ts-ignore
/* eslint-disable */
import request from '@/request'

/** 此处后端没有提供注释 POST /app/add */
export async function addApp(body: API.AppAddRequest, options?: { [key: string]: any }) {
	return request<API.BaseResponseLong>('/app/add', {
		method: 'POST',
		headers: {
			'Content-Type': 'application/json',
		},
		data: body,
		...(options || {}),
	})
}

/** 此处后端没有提供注释 POST /app/admin/delete */
export async function deleteAppByAdmin(body: API.DeleteRequest, options?: { [key: string]: any }) {
	return request<API.BaseResponseBoolean>('/app/admin/delete', {
		method: 'POST',
		headers: {
			'Content-Type': 'application/json',
		},
		data: body,
		...(options || {}),
	})
}

/** 此处后端没有提供注释 GET /app/admin/get/vo */
export async function getAppVoByIdByAdmin(
	// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
	params: API.getAppVOByIdByAdminParams,
	options?: { [key: string]: any }
) {
	return request<API.BaseResponseAppVO>('/app/admin/get/vo', {
		method: 'GET',
		params: {
			...params,
		},
		...(options || {}),
	})
}

/** 此处后端没有提供注释 POST /app/admin/list/page/vo */
export async function listAppVoByPageByAdmin(body: API.AppQueryRequest, options?: { [key: string]: any }) {
	return request<API.BaseResponsePageAppVO>('/app/admin/list/page/vo', {
		method: 'POST',
		headers: {
			'Content-Type': 'application/json',
		},
		data: body,
		...(options || {}),
	})
}

/** 此处后端没有提供注释 POST /app/admin/update */
export async function updateAppByAdmin(body: API.AppAdminUpdateRequest, options?: { [key: string]: any }) {
	return request<API.BaseResponseBoolean>('/app/admin/update', {
		method: 'POST',
		headers: {
			'Content-Type': 'application/json',
		},
		data: body,
		...(options || {}),
	})
}

/** 此处后端没有提供注释 POST /app/chat/gen/code */
export async function chatToGenCode(body: API.ChatRequest, options?: { [key: string]: any }) {
	return request<API.ServerSentEventString[]>('/app/chat/gen/code', {
		method: 'POST',
		headers: {
			'Content-Type': 'application/json',
		},
		data: body,
		...(options || {}),
	})
}

/** 此处后端没有提供注释 POST /app/delete */
export async function deleteApp(body: API.DeleteRequest, options?: { [key: string]: any }) {
	return request<API.BaseResponseBoolean>('/app/delete', {
		method: 'POST',
		headers: {
			'Content-Type': 'application/json',
		},
		data: body,
		...(options || {}),
	})
}

/** 此处后端没有提供注释 POST /app/deploy */
export async function deployApp(body: API.AppDeployRequest, options?: { [key: string]: any }) {
	return request<API.BaseResponseString>('/app/deploy', {
		method: 'POST',
		headers: {
			'Content-Type': 'application/json',
		},
		data: body,
		...(options || {}),
	})
}

/** 此处后端没有提供注释 GET /app/download/${param0} */
export async function downloadAppCode(
	// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
	params: API.downloadAppCodeParams,
	options?: { [key: string]: any }
) {
	const { appId: param0, ...queryParams } = params
	return request<any>(`/app/download/${param0}`, {
		method: 'GET',
		params: { ...queryParams },
		...(options || {}),
	})
}

/** 此处后端没有提供注释 GET /app/get/vo */
export async function getAppVoById(
	// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
	params: API.getAppVOByIdParams,
	options?: { [key: string]: any }
) {
	return request<API.BaseResponseAppVO>('/app/get/vo', {
		method: 'GET',
		params: {
			...params,
		},
		...(options || {}),
	})
}

/** 此处后端没有提供注释 POST /app/good/list/page/vo */
export async function listGoodAppVoByPage(body: API.AppQueryRequest, options?: { [key: string]: any }) {
	return request<API.BaseResponsePageAppVO>('/app/good/list/page/vo', {
		method: 'POST',
		headers: {
			'Content-Type': 'application/json',
		},
		data: body,
		...(options || {}),
	})
}

/** 此处后端没有提供注释 POST /app/interrupt/${param0} */
export async function interruptGeneration(
	// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
	params: API.interruptGenerationParams,
	options?: { [key: string]: any }
) {
	const { appId: param0, ...queryParams } = params
	return request<API.BaseResponseBoolean>(`/app/interrupt/${param0}`, {
		method: 'POST',
		params: { ...queryParams },
		...(options || {}),
	})
}

/** 此处后端没有提供注释 POST /app/my/list/page/vo */
export async function listMyAppVoByPage(body: API.AppQueryRequest, options?: { [key: string]: any }) {
	return request<API.BaseResponsePageAppVO>('/app/my/list/page/vo', {
		method: 'POST',
		headers: {
			'Content-Type': 'application/json',
		},
		data: body,
		...(options || {}),
	})
}

/** 此处后端没有提供注释 GET /app/status/${param0} */
export async function getGenerationStatus(
	// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
	params: API.getGenerationStatusParams,
	options?: { [key: string]: any }
) {
	const { appId: param0, ...queryParams } = params
	return request<API.BaseResponseString>(`/app/status/${param0}`, {
		method: 'GET',
		params: { ...queryParams },
		...(options || {}),
	})
}

/** 此处后端没有提供注释 POST /app/undeploy/${param0} */
export async function undeployApp(
	// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
	params: API.undeployAppParams,
	options?: { [key: string]: any }
) {
	const { appId: param0, ...queryParams } = params
	return request<API.BaseResponseBoolean>(`/app/undeploy/${param0}`, {
		method: 'POST',
		params: { ...queryParams },
		...(options || {}),
	})
}

/** 此处后端没有提供注释 POST /app/update */
export async function updateApp(body: API.AppUpdateRequest, options?: { [key: string]: any }) {
	return request<API.BaseResponseBoolean>('/app/update', {
		method: 'POST',
		headers: {
			'Content-Type': 'application/json',
		},
		data: body,
		...(options || {}),
	})
}
